home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / go5060hz.lzh / GO5060HZ.S < prev    next >
Comma Seperated Value File  |  1987-04-22  |  2KB  |  56 rows

#start move.l spa5 start the program!
1    move.l #ustksp        Make space available...
2    move.l 4(a5)a5
3    move.l $c(a5)d0
4    add.l $14(a5)d0
5    add.l $1c(a5)d0
6    add.l #$100d0
7    move.l d0size
8    move.l d0-(sp)
9    move.l a5-(sp)
10    move.w d0-(sp)
11    move.w #$4a-(sp)
12    trap #1            and free up unused memory
13    add.l #12sp        accordingly.
14gosuper    clr.l -(sp)        enter supervisor mode
15    move.w #32-(sp)
16    trap #1
17    addq #6sp
18    move.l d0savestk        keep track of the old stack
19install    suba.l a4a4        install the reset-program.
20    move.l #$31415926d0    magic number.
21    move.l d0$426(a4)        RESVALID
22    move.l #god0        reset program address.
23    move.l d0$42a(a4)        RESVECTOR
24gouser    move.l savestk-(sp)    go back to user mode now
25    move.w #32-(sp)
26    trap #1
27    addq #6sp
28exit    clr.w -(sp)        and finish the installation.
29    move.l sized0
30    move.l d0-(sp)
31    move.w #49-(sp)
32    trap #1
33go    sub.l a4a4        Start of the reset-program.
34    move.l #0$426(a4)        clear the program from memory
35    move.l #0$42a(a4)        after a reset!
36newbit    lea    $FFFF8800a0    Just replacing $FC0084 of
37    move.b    #$7(a0)        the ROM here because we want to
38    move.b    #$C0$2(a0)    skip over the original version.
39    move.b    #$E(a0)
40    move.b    #$7$2(a0)
41    move.b    $fc001dd0
42    btst    #$0d0
43    beq    continue
44    lea    continue(pc)a6
45    move.l    #$fc0e1aa5
46    jmp (a5)
47continue    move.l #$ff820aa5        Right... the frequency address.
48    move.b #0d0        D0 holds the new frequency.
49    move.b d0(a5)        0 for 60Hz and 2 for 50Hz.
50    move.l #$fc00b6a6        Continue with original part of
51    jmp (a6)            the ROM...
52    ds.l 20            Stack space... stack grows
53ustk    ds.l 1            downwards.
54size    ds.l 1            Size of memory to keep
55savestk    ds.l 1            old stack pointer.